Total Items in Mailbox  / time an item has been in mailbox
Hi, *WARNING* I know nothing about scripting (shame on me) and need help with the following: I am running Exchange 2003 Ent. SP2 and I have multiple mailboxes I need to monitor. Items sent to these mailboxes get automatically removed by a script and imported into our Imaging system. So these mailboxes should be empty all the time. If an item has been in the mailbox for more that 2 minutes and it has not been removed then that's an indication that something broke. I know there is an "Exchange_Mailbox" WMI Class and it has a TotalItems property. Can powershell be used for this or vbscript? I would like to be able to specify the mailboxes I want to monitor on the script and for the script to check the amount of items in those mailboxes and if the total number of items exceeds an amount I would like to receive an email notifying me. Ideally, it would be nice for the script to check how long an item has been in the mailbox instead of checking for the total items, but I guess either one would work. Your help will be appreciated. Thanks. Josue
February 5th, 2010 5:33pm

On Fri, 5-Feb-10 14:33:50 GMT, geekinput wrote:>Hi, *WARNING* I know nothing about scripting (shame on me) and need help with the following: I am running Exchange 2003 Ent. SP2 and I have multiple mailboxes I need to monitor. Items sent to these mailboxes get automatically removed by a script and imported into our Imaging system. So these mailboxes should be empty all the time. If an item has been in the mailbox for more that 2 minutes and it has not been removed then that's an indication that something broke. I know there is an "Exchange_Mailbox" WMI Class and it has a TotalItems property. Can powershell be used for this or vbscript? I would like to be able to specify the mailboxes I want to monitor on the script and for the script to check the amount of items in those mailboxes and if the total number of items exceeds an amount I would like to receive an email notifying me. Ideally, it would be nice for the script to check how long an item has been in the mailbox instead of checking for the total items, but I guess either>one would work. Your help will be appreciated. Thanks. Josue The get-mailboxstatistics will return total number of items in amailbox in the ItemCount propety.The get-mailboxfolderstatistics can tell you the number of items in afolder and the age of the oldest and newest item in the folder.You can find examples of using .Net to send e-mail from Powershellwith not too uch searching.---Rich MatheisenMCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
February 6th, 2010 6:48am

The thread said Exchange 2003. I thought that Powershell only worked on Exchange 2007+ and later. Are you sure that that Powershell command will work?
January 21st, 2011 10:45am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics